From: Stefan Monnier Date: Wed, 21 Apr 2004 22:41:53 +0000 (+0000) Subject: (XINT) [EXPLICIT_SIGN_EXTEND && !NO_UNION_TYPE]: X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22995 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=fce3217f80b9a6e209ad7216f1a725c6ac5a56a4;p=emacs.git (XINT) [EXPLICIT_SIGN_EXTEND && !NO_UNION_TYPE]: Don't make assumptions about the relative place of i and val. (EQ) [!NO_UNION_TYPE]: Don't forget to check the type match as well. --- diff --git a/src/lisp.h b/src/lisp.h index 265d3c29273..aa1e0cb8e40 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -382,7 +382,7 @@ enum pvec_type #ifdef EXPLICIT_SIGN_EXTEND /* Make sure we sign-extend; compilers have been known to fail to do so. */ -#define XINT(a) (((a).i << (BITS_PER_EMACS_INT - VALBITS)) \ +#define XINT(a) (((a).s.val << (BITS_PER_EMACS_INT - VALBITS)) \ >> (BITS_PER_EMACS_INT - VALBITS)) #else #define XINT(a) ((a).s.val) @@ -400,7 +400,7 @@ enum pvec_type extern Lisp_Object make_number (); #endif -#define EQ(x, y) ((x).s.val == (y).s.val) +#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) #endif /* NO_UNION_TYPE */